//大，中，小和金木水火土判断
	function caculate($dom,$dom1,total){
			if(total<809){//表示小
				$dom.eq(0).children().eq(2).children().addClass('cur');
				$dom.eq(0).children().eq(2).siblings().children("div").removeClass('cur');
				$dom1.find('.side-xiao').show(0);
				$dom1.find('.side-da').hide(0);
				$dom1.find('.side-he').hide(0);
			}
			if(total==810){//20个球总和为810 为和
				$dom.eq(0).children().eq(1).children().addClass('cur');
				$dom.eq(0).children().eq(1).siblings().children("div").removeClass('cur');
				$dom1.find('.side-xiao').hide(0);
				$dom1.find('.side-da').hide(0);
				$dom1.find('.side-he').show(0);
			}
			if(total>811&&total<1410){//表示大
				$dom.eq(0).children().eq(0).children().addClass('cur');
				$dom.eq(0).children().eq(0).siblings().children("div").removeClass('cur');
				$dom1.find('.side-da').show(0);
				$dom1.find('.side-xiao').hide(0);
				$dom1.find('.side-he').hide(0);
			}
			if(total<695){//表示金
				$dom.eq(5).children().eq(0).children().addClass('cur');
				$dom.eq(5).children().eq(0).siblings().children("div").removeClass('cur');
				$dom1.find('.side-jin').show(0);
				$dom1.find('.side-jin').siblings('.wuxing').hide(0);
			}
			if(total>696&&total<763){//表示木
				$dom.eq(5).children().eq(1).children().addClass('cur');
				$dom.eq(5).children().eq(1).siblings().children("div").removeClass('cur');
				$dom1.find('.side-mu').show(0);
				$dom1.find('.side-mu').siblings('.wuxing').hide(0);
			}
			if(total>764&&total<855){//表示水
				$dom.eq(5).children().eq(2).children().addClass('cur');
				$dom.eq(5).children().eq(2).siblings().children("div").removeClass('cur');
				$dom1.find('.side-shui').show(0);
				$dom1.find('.side-shui').siblings('.wuxing').hide(0);
			}
			if(total>856&&total<923){//表示火
				$dom.eq(5).children().eq(3).children().addClass('cur');
				$dom.eq(5).children().eq(3).siblings().children("div").removeClass('cur');
				$dom1.find('.side-huo').show(0);
				$dom1.find('.side-huo').siblings('.wuxing').hide(0);
			}
			if(total>924&&total<1410){//表示土
				$dom.eq(5).children().eq(4).children().addClass('cur');
				$dom.eq(5).children().eq(4).siblings().children("div").removeClass('cur');
				$dom1.find('.side-tu').show(0);
				$dom1.find('.side-tu').siblings('.wuxing').hide(0);
			}
	}
	//判断上中下
	function checkupdown($dom,$dom1,nums){
		var arr,m=0,n=0;//m表示上，n表示下
		arr=nums.split(",");
		for(var i=0;i<arr.length;i++){
			if(parseInt(arr[i])<41){
				m++;
			}else {
				n++;
			}
		}
		if(m>n){//表示上
			$dom.eq(1).children().eq(0).children().addClass('cur');
			$dom.eq(1).children().eq(0).siblings().children("div").removeClass('cur');
			$dom1.find('.side-shang').show();
			$dom1.find('.side-zhong').hide();
			$dom1.find('.side-xia').hide();

		}else if(m<n){//表示下
			$dom.eq(1).children().eq(2).children().addClass('cur');
			$dom.eq(1).children().eq(2).siblings().children("div").removeClass('cur');
			$dom1.find('.side-xia').show();
			$dom1.find('.side-zhong').hide();
			$dom1.find('.side-shang').hide();
		}else{//表示和
			$dom.eq(1).children().eq(1).children().addClass('cur');
			$dom.eq(1).children().eq(1).siblings().children("div").removeClass('cur');
			$dom1.find('.side-shang').hide();
			$dom1.find('.side-xia').hide();
			$dom1.find('.side-zhong').show();
		}
	}
	//判断奇偶
	function checkodd($dom,$dom1,nums){
		//return num%2==0?true:false; 
		var arr,m=0,n=0;//m表示偶数，n表示奇数
		arr=nums.split(",");
		for(var i=0;i<arr.length;i++){
			arr[i]%2===0?m++:n++;
		}
		if(m>n){//表示偶数
			$dom.eq(2).children().eq(2).children().addClass('cur');
			$dom.eq(2).children().eq(2).siblings().children("div").removeClass('cur');
			$dom1.find('.side-ou').show();
			$dom1.find('.side-qi').hide();
			$dom1.find('.jiou').hide();
		}else if(m<n){//表示奇数
			$dom.eq(2).children().eq(0).children().addClass('cur');
			$dom.eq(2).children().eq(0).siblings().children("div").removeClass('cur');
			$dom1.find('.side-qi').show();
			$dom1.find('.side-ou').hide();
			$dom1.find('.jiou').hide();
		}else{//表示和
			$dom.eq(2).children().eq(1).children().addClass('cur');
			$dom.eq(2).children().eq(1).siblings().children("div").removeClass('cur');
			$dom1.find('.side-ou').hide();
			$dom1.find('.side-qi').hide();
			$dom1.find('.jiou').show();
		}
	}
	//判断单双
	function checksingle($dom,$dom1,nums){
		if(nums%2===0){//总和为双
			$dom.eq(3).children().eq(1).children().addClass('cur');
			$dom.eq(3).children().eq(1).siblings().children("div").removeClass('cur');
			$dom1.find('.side-shuang').show();
			$dom1.find('.side-dan').hide();
		}else{
			$dom.eq(3).children().eq(0).children().addClass('cur');
			$dom.eq(3).children().eq(0).siblings().children("div").removeClass('cur');
			$dom1.find('.side-dan').show();
			$dom1.find('.side-shuang').hide();
		}
	}
	//判断大单大双
	function checkBigSingle($dom,$dom1){
		if($dom.eq(0).children().eq(0).children().hasClass('cur')&&$dom.eq(3).children().eq(0).children().hasClass('cur')){
			$dom.eq(4).children().eq(0).children().addClass('cur');
			$dom.eq(4).children().eq(0).siblings().children("div").removeClass('cur');
		}
		if($dom.eq(0).children().eq(0).children().hasClass('cur')&&$dom.eq(3).children().eq(1).children().hasClass('cur')){
			$dom.eq(4).children().eq(2).children().addClass('cur');
			$dom.eq(4).children().eq(2).siblings().children("div").removeClass('cur');
		}
		if($dom.eq(0).children().eq(2).children().hasClass('cur')&&$dom.eq(3).children().eq(0).children().hasClass('cur')){
			$dom.eq(4).children().eq(1).children().addClass('cur');
			$dom.eq(4).children().eq(1).siblings().children("div").removeClass('cur');
		}
		if($dom.eq(0).children().eq(2).children().hasClass('cur')&&$dom.eq(3).children().eq(1).children().hasClass('cur')){
			$dom.eq(4).children().eq(3).children().addClass('cur');
			$dom.eq(4).children().eq(3).siblings().children("div").removeClass('cur');
		}
	}
	//判断五行
	function checkwx($dom,$dom1,nums){
		if(nums%2===0){//总和为双
			$dom.eq(5).children().eq(1).children().addClass('cur');
			$dom.eq(5).children().eq(1).siblings().children("div").removeClass('cur');
			$dom1.find('.side-shuang').show();
			$dom1.find('.side-dan').hide();
		}else{
			$dom.eq(5).children().eq(0).children().addClass('cur');
			$dom.eq(5).children().eq(0).siblings().children("div").removeClass('cur');
			$dom1.find('.side-dan').show();
			$dom1.find('.side-shuang').hide();
		}
	}
	//快乐彩开奖动画方法 
	function openklc(id,nums,expect){
		var klcArray=nums.split(",");
		//路子重新加载
		var  daxiao ='';
		var shangxia='';
		var jiou='';
		var danshuang='';
		var wuxing ='';
		var tatolAll=0;
		var s=0;
		var x=0;
		var j=0;
		var o=0;
		for(i=0;i<20;i++) {
			tatolAll+=parseInt(klcArray[i]);
			if(parseInt(klcArray[i])<41)
				s++;
			else x++;
			if(parseInt(klcArray[i])%2===0)
				o++;
			else j++;
		}
		if (tatolAll > 810) {
			daxiao="大";
		} else if (tatolAll < 810) {
			daxiao="小";
		} else {
			daxiao="和";
		}
		if (s > x) {
			shangxia="上";
		} else if (s < x) {
			shangxia="下";
		} else {
			shangxia="中";
		}
		if (j > o) {
			jiou="奇";
		} else if (j < o) {
			jiou="偶";
		} else {
			jiou="和";
		}
		if (tatolAll % 2 === 0) {
			danshuang="双";
		} else {
			danshuang="单";
		}
		if (tatolAll >= 210 && tatolAll <= 695) {
			wuxing="金";
		} else if (tatolAll >= 696 && tatolAll <= 763) {
			wuxing="木";
		} else if (tatolAll >= 764 && tatolAll <= 855) {
			wuxing="水";
		} else if (tatolAll >= 856 && tatolAll <= 923) {
			wuxing="火";
		} else {
			wuxing="土";
		}
		var lastexpect=$("#"+id+"Expect").val();
		if(lastexpect!=expect){
			pattendaxiaonew(id,daxiao);
			pattenshangxianew(id,shangxia);
            pattenjiounew(id,jiou);
			pattendanshuangnew(id,danshuang);
			pattenwuxingnew(id,wuxing);
//			//pattentatolnew(id,tatolAll);
		}
		var liparam,total,numstring,divsec,divthird;
		$("#"+id).find(".keno-fun-bar > div > ul > li").hide();
		$("#"+id).find(".keno-fun-bar > div > ul > li").removeClass();
		liparam=$("#"+id).find(".keno-fun-bar > div > ul > li").first();
		divsec=$("#"+id).find(".k-mari").children();
		divthird=$("#"+id).find(".keno-fun-bar > div").find("div").find("ul");
		liparam.fadeIn(300,function(){//第1个球			
			$(this).text(klcArray[0]);
			if(parseInt(klcArray[0])<=40){
				$(this).addClass('open-small');
			}else{	
				$(this).addClass('open-big');
			}
			total=parseInt(klcArray[0]);
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小 五行
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,klcArray[0]);
			//判断奇偶和
			checkodd(divsec,divthird,klcArray[0]);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第二个球
				$(this).text(klcArray[1]);
				if(parseInt(klcArray[1])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
				total=parseInt(klcArray[0])+parseInt(klcArray[1]);
				divthird.find("li:first-child").show(0).text(total);
				numstring=klcArray[0]+","+klcArray[1];
				//判断大中小
				caculate(divsec,divthird,total);
				//判断上中下
				checkupdown(divsec,divthird,numstring);
				//判断奇偶和
				checkodd(divsec,divthird,numstring);
				//判断单双
				checksingle(divsec,divthird,total);
				//判断大单大双
				checkBigSingle(divsec,divthird);
				$(this).next("li").fadeIn(300, function() {//第三个球
					$(this).text(klcArray[2]);
					if(parseInt(klcArray[2])<=40){
						$(this).addClass('open-small');
					}else{
						$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300,function(){//第4个球
				$(this).text(klcArray[3]);
				if(parseInt(klcArray[3])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第5个球
				$(this).text(klcArray[4]);
				if(parseInt(klcArray[4])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第6个球
				$(this).text(klcArray[5]);
				if(parseInt(klcArray[5])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第7个球
				$(this).text(klcArray[6]);
				if(parseInt(klcArray[6])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第8个球
				$(this).text(klcArray[7]);
				if(parseInt(klcArray[7])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第9个球
				$(this).text(klcArray[8]);
				if(parseInt(klcArray[8])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第10个球
				$(this).text(klcArray[9]);
				if(parseInt(klcArray[9])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第11个球
				$(this).text(klcArray[10]);
				if(parseInt(klcArray[10])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第12个球
				$(this).text(klcArray[11]);
				if(parseInt(klcArray[11])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第13个球
				$(this).text(klcArray[12]);
				if(parseInt(klcArray[12])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11]+","+klcArray[12];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第14个球
				$(this).text(klcArray[13]);
				if(parseInt(klcArray[13])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12])+parseInt(klcArray[13]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11]+","+klcArray[12]+","+klcArray[13];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第15个球
				$(this).text(klcArray[14]);
				if(parseInt(klcArray[14])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12])+parseInt(klcArray[13])+parseInt(klcArray[14]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11]+","+klcArray[12]+","+klcArray[13]+","+klcArray[14];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第16个球
				$(this).text(klcArray[15]);
				if(parseInt(klcArray[15])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12])+parseInt(klcArray[13])+parseInt(klcArray[14])+parseInt(klcArray[15]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11]+","+klcArray[12]+","+klcArray[13]+","+klcArray[14]+","+klcArray[15];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第17个球
				$(this).text(klcArray[16]);
				if(parseInt(klcArray[16])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12])+parseInt(klcArray[13])+parseInt(klcArray[14])+parseInt(klcArray[15])+parseInt(klcArray[16]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11]+","+klcArray[12]+","+klcArray[13]+","+klcArray[14]+","+klcArray[15]+","+klcArray[16];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第18个球
				$(this).text(klcArray[17]);
				if(parseInt(klcArray[17])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12])+parseInt(klcArray[13])+parseInt(klcArray[14])+parseInt(klcArray[15])+parseInt(klcArray[16])+parseInt(klcArray[17]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11]+","+klcArray[12]+","+klcArray[13]+","+klcArray[14]+","+klcArray[15]+","+klcArray[16]+","+klcArray[17];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第19个球
				$(this).text(klcArray[18]);
				if(parseInt(klcArray[18])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12])+parseInt(klcArray[13])+parseInt(klcArray[14])+parseInt(klcArray[15])+parseInt(klcArray[16])+parseInt(klcArray[17])+parseInt(klcArray[18]);
			numstring=klcArray[0]+","+klcArray[1]+","+klcArray[2]+","+klcArray[3]+","+klcArray[4]+","+klcArray[5]+","+klcArray[6]+","+klcArray[7]+","+klcArray[8]+","+klcArray[9]+","+klcArray[10]+","+klcArray[11]+","+klcArray[12]+","+klcArray[13]+","+klcArray[14]+","+klcArray[15]+","+klcArray[16]+","+klcArray[17]+","+klcArray[18];
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,numstring);
			//判断奇偶和
			checkodd(divsec,divthird,numstring);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			$(this).next("li").fadeIn(300, function() {//第20个球
				$(this).text(klcArray[19]);
				if(parseInt(klcArray[19])<=40){
					$(this).addClass('open-small');
				}else{
					$(this).addClass('open-big');
				}
			total=parseInt(klcArray[0])+parseInt(klcArray[1])+parseInt(klcArray[2])+parseInt(klcArray[3])+parseInt(klcArray[4])+parseInt(klcArray[5])+parseInt(klcArray[6])+parseInt(klcArray[7])+parseInt(klcArray[8])+parseInt(klcArray[9])+parseInt(klcArray[10])+parseInt(klcArray[11])+parseInt(klcArray[12])+parseInt(klcArray[13])+parseInt(klcArray[14])+parseInt(klcArray[15])+parseInt(klcArray[16])+parseInt(klcArray[17])+parseInt(klcArray[18])+parseInt(klcArray[19]);
			divthird.find("li:first-child").show(0).text(total);
			//判断大中小
			caculate(divsec,divthird,total);
			//判断上中下
			checkupdown(divsec,divthird,nums);
			//判断奇偶和
			checkodd(divsec,divthird,nums);
			//判断单双
			checksingle(divsec,divthird,total);
			//判断大单大双
			checkBigSingle(divsec,divthird);
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
			});
		});
	}
	function pattentatolnew(id,arr) {
		var hezhiPanel = $("#hezhi_"+id+" ul");
		var cols= hezhiPanel.eq(0).children().length;
		var text1=hezhiPanel.eq(0).children().eq(cols-1).text();
		var text2=hezhiPanel.eq(1).children().eq(cols-1).text();
		var text3=hezhiPanel.eq(2).children().eq(cols-1).text();
		var text4=hezhiPanel.eq(3).children().eq(cols-1).text();
		var text5=hezhiPanel.eq(4).children().eq(cols-1).text();
		var text6=hezhiPanel.eq(5).children().eq(cols-1).text();
		var rows= 0;
		var lastText='';
		if(text6!=null&&text6!=''){
			rows=6;
			lastText=text6;
		}else if(text5!=null&&text5!=''){
			rows=5;
			lastText=text5;
		}else if(text4!=null&&text4!=''){
			rows=4;
			lastText=text4;
		}else if(text3!=null&&text3!=''){
			rows=3;
			lastText=text3;
		}else if(text2!=null&&text2!=''){
			rows=2;
			lastText=text2;
		}else if(text1!=null&&text1!=''){
			rows=1;
			lastText=text1;
		}
		var className="";
		 if(arr> 810 &&arr < 1410){
			className = "shuz-da";
		}else if(arr> 210 &&arr < 810){
			className = "shuz-x";
		}else if(arr==810){
			className = "shuz-he";
		}
			var leftCss=(43-cols)*23;
			var width=(cols+1)*23;
			if(rows==6){
				hezhiPanel.eq(0).append("<li class='"+className+"'><span>"+arr+"</span></li>");
				hezhiPanel.eq(1).append("<li></li>");
				hezhiPanel.eq(2).append("<li></li>");
				hezhiPanel.eq(3).append("<li></li>");
				hezhiPanel.eq(4).append("<li></li>");
				hezhiPanel.eq(5).append("<li></li>");
				hezhiPanel.css("left",leftCss+"px");
				hezhiPanel.css("width",width);
			}else if(rows==5){
				hezhiPanel.eq(5).children().eq(cols-1).html("<span>"+arr+"</span>");
				hezhiPanel.eq(5).children().eq(cols-1).addClass(className);
			}else if(rows==4){
				hezhiPanel.eq(4).children().eq(cols-1).html("<span>"+arr+"</span>");
				wuxingPanel.eq(4).children().eq(cols-1).addClass(className);
			}else if(rows==3){
				hezhiPanel.eq(3).children().eq(cols-1).html("<span>"+arr+"</span>");
				hezhiPanel.eq(3).children().eq(cols-1).addClass(className);
			}else if(rows==2){
				hezhiPanel.eq(2).children().eq(cols-1).html("<span>"+arr+"</span>");
				hezhiPanel.eq(2).children().eq(cols-1).addClass(className);
			}else if(rows==1){
				hezhiPanel.eq(1).children().eq(cols-1).html("<span>"+arr+"</span>");
				hezhiPanel.eq(1).children().eq(cols-1).addClass(className);
			}
	}	
	function pattenwuxingnew(id,arr) {
		var wuxingPanel = $("#wuxing_"+id+" ul");
		var cols= wuxingPanel.eq(0).children().length;
		var text1=wuxingPanel.eq(0).children().eq(cols-1).text();
		var text2=wuxingPanel.eq(1).children().eq(cols-1).text();
		var text3=wuxingPanel.eq(2).children().eq(cols-1).text();
		var text4=wuxingPanel.eq(3).children().eq(cols-1).text();
		var text5=wuxingPanel.eq(4).children().eq(cols-1).text();
		var text6=wuxingPanel.eq(5).children().eq(cols-1).text();
		var rows= 0;
		var lastText='';
		if(text6!=null&&text6!=''){
			rows=6;
			lastText=text6;
		}else if(text5!=null&&text5!=''){
			rows=5;
			lastText=text5;
		}else if(text4!=null&&text4!=''){
			rows=4;
			lastText=text4;
		}else if(text3!=null&&text3!=''){
			rows=3;
			lastText=text3;
		}else if(text2!=null&&text2!=''){
			rows=2;
			lastText=text2;
		}else if(text1!=null&&text1!=''){
			rows=1;
			lastText=text1;
		}
		var className="";
		 if(arr == '金'){
			className = "circle-jin";
		}else if(arr == '木'){
			className = "circle-mu";
		}else if(arr == '水'){
			className = "circle-shui";
		}else if(arr == '火'){
			className = "circle-huo";
		}else if(arr == '土'){
			className = "circle-tu";
		}


		var leftCss=(43-cols)*19;
		var width=(cols+1)*19;
		if(arr==lastText||arr=="和"){
			if(rows==6){
				wuxingPanel.eq(0).append("<li></li>");
				wuxingPanel.eq(1).append("<li></li>");
				wuxingPanel.eq(2).append("<li></li>");
				wuxingPanel.eq(3).append("<li></li>");
				wuxingPanel.eq(4).append("<li></li>");
				wuxingPanel.eq(5).append("<li class='"+className+"'><span>"+arr+"</span></li>");

				wuxingPanel.css("left",leftCss+"px");
				wuxingPanel.css("width",width);

			} else if(rows==5){
				wuxingPanel.eq(5).children().eq(cols-1).html("<span>"+arr+"</span>");
				wuxingPanel.eq(5).children().eq(cols-1).addClass(className);
			}else if(rows==4){
				wuxingPanel.eq(4).children().eq(cols-1).html("<span>"+arr+"</span>");
				wuxingPanel.eq(4).children().eq(cols-1).addClass(className);
			}else if(rows==3){
				wuxingPanel.eq(3).children().eq(cols-1).html("<span>"+arr+"</span>");
				wuxingPanel.eq(3).children().eq(cols-1).addClass(className);
			}else if(rows==2){
				wuxingPanel.eq(2).children().eq(cols-1).html("<span>"+arr+"</span>");
				wuxingPanel.eq(2).children().eq(cols-1).addClass(className);
			}else if(rows==1){
				wuxingPanel.eq(1).children().eq(cols-1).html("<span>"+arr+"</span>");
				wuxingPanel.eq(1).children().eq(cols-1).addClass(className);
			}
		}else{
			wuxingPanel.eq(0).append("<li class='"+className+"'><span>"+arr+"</span></li>");
			wuxingPanel.eq(1).append("<li></li>");
			wuxingPanel.eq(2).append("<li></li>");
			wuxingPanel.eq(3).append("<li></li>");
			wuxingPanel.eq(4).append("<li></li>");
			wuxingPanel.eq(5).append("<li></li>");
			wuxingPanel.css("left",leftCss+"px");
			wuxingPanel.css("width",width);
		}
	}	
	function pattenjiounew(id,arr) {
		var jiouPanel = $("#jiou_"+id+" ul");
		var cols= jiouPanel.eq(0).children().length;
		var text1=jiouPanel.eq(0).children().eq(cols-1).text();
		var text2=jiouPanel.eq(1).children().eq(cols-1).text();
		var text3=jiouPanel.eq(2).children().eq(cols-1).text();
		var text4=jiouPanel.eq(3).children().eq(cols-1).text();
		var text5=jiouPanel.eq(4).children().eq(cols-1).text();
		var text6=jiouPanel.eq(5).children().eq(cols-1).text();
		var rows= 0;
		var lastText='';
		if(text6!=null&&text6!=''){
			rows=6;
			lastText=text6;
		}else if(text5!=null&&text5!=''){
			rows=5;
			lastText=text5;
		}else if(text4!=null&&text4!=''){
			rows=4;
			lastText=text4;
		}else if(text3!=null&&text3!=''){
			rows=3;
			lastText=text3;
		}else if(text2!=null&&text2!=''){
			rows=2;
			lastText=text2;
		}else if(text1!=null&&text1!=''){
			rows=1;
			lastText=text1;
		}
		var className="";
		 if(arr == '奇'){
			className = "circle-qi";
		 }else if(arr == '偶'){
			className = "circle-ou";
		}else if(arr == '和'){
			className = "circle-he";
		}


		var leftCss=(43-cols)*19;
		var width=(cols+1)*19;
		var temp ="";
		if(rows==2) {
			temp = text1;
		}
		if(rows==3) {
			temp = text2;
		}
		if(rows==4) {
			temp = text3;
		}
		if(rows==5) {
			temp = text4;
		}
		if(rows==6) {
			temp = text5;
		}
		if(arr==lastText||arr=="和"|| (temp==arr&&lastText=="和")){
			if(rows==6){
				jiouPanel.eq(0).append("<li></li>");
				jiouPanel.eq(1).append("<li></li>");
				jiouPanel.eq(2).append("<li></li>");
				jiouPanel.eq(3).append("<li></li>");
				jiouPanel.eq(4).append("<li></li>");
				jiouPanel.eq(5).append("<li class='"+className+"'><span>"+arr+"</span></li>");
				jiouPanel.css("left",leftCss+"px");
				jiouPanel.css("width",width);
			}else if(rows==5){
				jiouPanel.eq(5).children().eq(cols-1).html("<span>"+arr+"</span>");
				jiouPanel.eq(5).children().eq(cols-1).addClass(className);
			}else if(rows==4){
				jiouPanel.eq(4).children().eq(cols-1).html("<span>"+arr+"</span>");
				jiouPanel.eq(4).children().eq(cols-1).addClass(className);
			}else if(rows==3){
				jiouPanel.eq(3).children().eq(cols-1).html("<span>"+arr+"</span>");
				jiouPanel.eq(3).children().eq(cols-1).addClass(className);
			}else if(rows==2){
				jiouPanel.eq(2).children().eq(cols-1).html("<span>"+arr+"</span>");
				jiouPanel.eq(2).children().eq(cols-1).addClass(className);
			}else if(rows==1){
				jiouPanel.eq(1).children().eq(cols-1).html("<span>"+arr+"</span>");
				jiouPanel.eq(1).children().eq(cols-1).addClass(className);
			}
		}else{
			jiouPanel.eq(0).append("<li class='"+className+"'><span>"+arr+"</span></li>");
			jiouPanel.eq(1).append("<li></li>");
			jiouPanel.eq(2).append("<li></li>");
			jiouPanel.eq(3).append("<li></li>");
			jiouPanel.eq(4).append("<li></li>");
			jiouPanel.eq(5).append("<li></li>");
			jiouPanel.css("left",leftCss+"px");
			jiouPanel.css("width",width);
		}
	}	
	function pattenshangxianew(id,arr) {
		var shangxiaPanel = $("#shangxia_"+id+" ul");
		var cols= shangxiaPanel.eq(0).children().length;
		var text1=shangxiaPanel.eq(0).children().eq(cols-1).text();
		var text2=shangxiaPanel.eq(1).children().eq(cols-1).text();
		var text3=shangxiaPanel.eq(2).children().eq(cols-1).text();
		var text4=shangxiaPanel.eq(3).children().eq(cols-1).text();
		var text5=shangxiaPanel.eq(4).children().eq(cols-1).text();
		var text6=shangxiaPanel.eq(5).children().eq(cols-1).text();
		var rows= 0;
		var lastText='';
		if(text6!=null&&text6!=''){
			rows=6;
			lastText=text6;
		}else if(text5!=null&&text5!=''){
			rows=5;
			lastText=text5;
		}else if(text4!=null&&text4!=''){
			rows=4;
			lastText=text4;
		}else if(text3!=null&&text3!=''){
			rows=3;
			lastText=text3;
		}else if(text2!=null&&text2!=''){
			rows=2;
			lastText=text2;
		}else if(text1!=null&&text1!=''){
			rows=1;
			lastText=text1;
		}
		var className="";
		 if(arr == '上'){
			className = "circle-shang";
		}else if(arr == '下'){
			className = "circle-xia";
		}else if(arr == '中'){
			className = "circle-zhong";
		}

		var leftCss=(43-cols)*19;
		var width=(cols+1)*19;
		if(arr==lastText||arr=="中"){
			if(rows==6){
				shangxiaPanel.eq(0).append("<li></li>");
				shangxiaPanel.eq(1).append("<li></li>");
				shangxiaPanel.eq(2).append("<li></li>");
				shangxiaPanel.eq(3).append("<li></li>");
				shangxiaPanel.eq(4).append("<li></li>");
				shangxiaPanel.eq(5).append("<li class='"+className+"'><span>"+arr+"</span></li>");

				shangxiaPanel.css("left",leftCss+"px");
				shangxiaPanel.css("width",width);
			}else if(rows==5){
				shangxiaPanel.eq(5).children().eq(cols-1).html("<span>"+arr+"</span>");
				shangxiaPanel.eq(5).children().eq(cols-1).addClass(className);
			}else if(rows==4){
				shangxiaPanel.eq(4).children().eq(cols-1).html("<span>"+arr+"</span>");
				shangxiaPanel.eq(4).children().eq(cols-1).addClass(className);
			}else if(rows==3){
				shangxiaPanel.eq(3).children().eq(cols-1).html("<span>"+arr+"</span>");
				shangxiaPanel.eq(3).children().eq(cols-1).addClass(className);
			}else if(rows==2){
				shangxiaPanel.eq(2).children().eq(cols-1).html("<span>"+arr+"</span>");
				shangxiaPanel.eq(2).children().eq(cols-1).addClass(className);
			}else if(rows==1){
				shangxiaPanel.eq(1).children().eq(cols-1).html("<span>"+arr+"</span>");
				shangxiaPanel.eq(1).children().eq(cols-1).addClass(className);
			}
		}else{
			shangxiaPanel.eq(0).append("<li class='"+className+"'><span>"+arr+"</span></li>");
			shangxiaPanel.eq(1).append("<li></li>");
			shangxiaPanel.eq(2).append("<li></li>");
			shangxiaPanel.eq(3).append("<li></li>");
			shangxiaPanel.eq(4).append("<li></li>");
			shangxiaPanel.eq(5).append("<li></li>");
			shangxiaPanel.css("left",leftCss+"px");
			shangxiaPanel.css("width",width);
		}
	}	
	function pattendaxiaonew(id,arr) {
		var daxiaoPanel = $("#daxiao_"+id+" ul");
		var cols= daxiaoPanel.eq(0).children().length;
		var text1=daxiaoPanel.eq(0).children().eq(cols-1).text();
		var text2=daxiaoPanel.eq(1).children().eq(cols-1).text();
		var text3=daxiaoPanel.eq(2).children().eq(cols-1).text();
		var text4=daxiaoPanel.eq(3).children().eq(cols-1).text();
		var text5=daxiaoPanel.eq(4).children().eq(cols-1).text();
		var text6=daxiaoPanel.eq(5).children().eq(cols-1).text();
		var rows= 0;
		var lastText='';
		if(text6!=null&&text6!=''){
			rows=6;
			lastText=text6;
		}else if(text5!=null&&text5!=''){
			rows=5;
			lastText=text5;
		}else if(text4!=null&&text4!=''){
			rows=4;
			lastText=text4;
		}else if(text3!=null&&text3!=''){
			rows=3;
			lastText=text3;
		}else if(text2!=null&&text2!=''){
			rows=2;
			lastText=text2;
		}else if(text1!=null&&text1!=''){
			rows=1;
			lastText=text1;
		}
		var className="";
		 if(arr == '大'){
			className = "circle-da";
		}else if(arr == '小'){
			className = "circle-xiao";
		}else if(arr == '和'){
			className = "circle-he";
		}

		var leftCss=(43-cols)*19;
		var width=(cols+1)*19;
		if(arr==lastText||arr=="和"){
			if(rows==6){
				daxiaoPanel.eq(0).append("<li></li>");
				daxiaoPanel.eq(1).append("<li></li>");
				daxiaoPanel.eq(2).append("<li></li>");
				daxiaoPanel.eq(3).append("<li></li>");
				daxiaoPanel.eq(4).append("<li></li>");
				daxiaoPanel.eq(5).append("<li class='"+className+"'><span>"+arr+"</span></li>");
				daxiaoPanel.css("left",leftCss+"px");
				daxiaoPanel.css("width",width);
			}else if(rows==5){
				daxiaoPanel.eq(5).children().eq(cols-1).html("<span>"+arr+"</span>");
				daxiaoPanel.eq(5).children().eq(cols-1).addClass(className);
			}else if(rows==4){
				daxiaoPanel.eq(4).children().eq(cols-1).html("<span>"+arr+"</span>");
				daxiaoPanel.eq(4).children().eq(cols-1).addClass(className);
			}else if(rows==3){
				daxiaoPanel.eq(3).children().eq(cols-1).html("<span>"+arr+"</span>");
				daxiaoPanel.eq(3).children().eq(cols-1).addClass(className);
			}else if(rows==2){
				daxiaoPanel.eq(2).children().eq(cols-1).html("<span>"+arr+"</span>");
				daxiaoPanel.eq(2).children().eq(cols-1).addClass(className);
			}else if(rows==1){
				daxiaoPanel.eq(1).children().eq(cols-1).html("<span>"+arr+"</span>");
				daxiaoPanel.eq(1).children().eq(cols-1).addClass(className);
			}
		}else{
			daxiaoPanel.eq(0).append("<li class='"+className+"'><span>"+arr+"</span></li>");
			daxiaoPanel.eq(1).append("<li></li>");
			daxiaoPanel.eq(2).append("<li></li>");
			daxiaoPanel.eq(3).append("<li></li>");
			daxiaoPanel.eq(4).append("<li></li>");
			daxiaoPanel.eq(5).append("<li></li>");
			daxiaoPanel.css("left",leftCss+"px");
			daxiaoPanel.css("width",width);
		}
	}	

	//重新加载路子  
function pattendanshuangnew(id,arr) {
		var danshuangPanel = $("#danshuang_"+id+" ul");
		var cols= danshuangPanel.eq(0).children().length;
		var text1=danshuangPanel.eq(0).children().eq(cols-1).text();
		var text2=danshuangPanel.eq(1).children().eq(cols-1).text();
		var text3=danshuangPanel.eq(2).children().eq(cols-1).text();
		var text4=danshuangPanel.eq(3).children().eq(cols-1).text();
		var text5=danshuangPanel.eq(4).children().eq(cols-1).text();
		var text6=danshuangPanel.eq(5).children().eq(cols-1).text();
		var rows= 0;
		var lastText=''
		if(text6!=null&&text6!=''){
			rows=6;
			lastText=text6;
		}else if(text5!=null&&text5!=''){
			rows=5;
			lastText=text5;
		}else if(text4!=null&&text4!=''){
			rows=4;
			lastText=text4;
		}else if(text3!=null&&text3!=''){
			rows=3;
			lastText=text3;
		}else if(text2!=null&&text2!=''){
			rows=2;
			lastText=text2;
		}else if(text1!=null&&text1!=''){
			rows=1;
			lastText=text1;
		}
		var className="";
		 if(arr == '单'){
			className = "circle-dan";
		}else if(arr == '双'){
			className = "circle-shuang";
		}else if(arr == '和'){
			className = "circle-he";
		}

		var leftCss=(43-cols)*19;
		var width=(cols+1)*19;
		if(arr==lastText||arr=="和"){
			if(rows==6){
				danshuangPanel.eq(0).append("<li></li>");
				danshuangPanel.eq(1).append("<li></li>");
				danshuangPanel.eq(2).append("<li></li>");
				danshuangPanel.eq(3).append("<li></li>");
				danshuangPanel.eq(4).append("<li></li>");
				danshuangPanel.eq(5).append("<li class='"+className+"'><span>"+arr+"</span></li>");

				danshuangPanel.css("left",leftCss+"px");
				danshuangPanel.css("width",width);
			}else if(rows==5){
				danshuangPanel.eq(5).children().eq(cols-1).html("<span>"+arr+"</span>");
				danshuangPanel.eq(5).children().eq(cols-1).addClass(className);
			}else if(rows==4){
				danshuangPanel.eq(4).children().eq(cols-1).html("<span>"+arr+"</span>");
				danshuangPanel.eq(4).children().eq(cols-1).addClass(className);
			}else if(rows==3){
				danshuangPanel.eq(3).children().eq(cols-1).html("<span>"+arr+"</span>");
				danshuangPanel.eq(3).children().eq(cols-1).addClass(className);
			}else if(rows==2){
				danshuangPanel.eq(2).children().eq(cols-1).html("<span>"+arr+"</span>");
				danshuangPanel.eq(2).children().eq(cols-1).addClass(className);
			}else if(rows==1){
				danshuangPanel.eq(1).children().eq(cols-1).html("<span>"+arr+"</span>");
				danshuangPanel.eq(1).children().eq(cols-1).addClass(className);
			}
		}else{
			danshuangPanel.eq(0).append("<li class='"+className+"'><span>"+arr+"</span></li>");
			danshuangPanel.eq(1).append("<li></li>");
			danshuangPanel.eq(2).append("<li></li>");
			danshuangPanel.eq(3).append("<li></li>");
			danshuangPanel.eq(4).append("<li></li>");
			danshuangPanel.eq(5).append("<li></li>");
			danshuangPanel.css("left",leftCss+"px");
			danshuangPanel.css("width",width);
		}
	}
//===========================彩票路单编写=========================================//
//总方法
function patten(arrdaxiao, arrdanshuang, arrjiou, arrshangxia, arrhezhi, arrwuxing,shortName) {
	pattendaxiao(arrdaxiao,shortName);
	pattendanshuang(arrdanshuang,shortName);
	pattenjiou(arrjiou,shortName);
	pattenshangxia(arrshangxia,shortName);
//	pattenhezhi(arrhezhi,shortName);
	pattenwuxing(arrwuxing,shortName);
}

function pattendaxiao(arr,shortName) {
	var cols = 0,
		row = 0,
        fristCode; //cols表示列 row表示行 fristCode标识当前列第一个球
	var daxiaoPanel = $("#daxiao_"+shortName);
	daxiaoPanel.empty();
	var daxiaoHtml = [];
	daxiaoHtml[0] = '<ul class="row1">';
	daxiaoHtml[1] = '<ul class="row2">';
	daxiaoHtml[2] = '<ul class="row3">';
	daxiaoHtml[3] = '<ul class="row4">';
	daxiaoHtml[4] = '<ul class="row5">';
	daxiaoHtml[5] = '<ul class="row6">';
	for (var i = 0; i < arr.length; i++) {
		if (i == 0) {
			if (arr[i] == "大") {
                fristCode = '大';
				daxiaoHtml[0] += "<li class='circle-da'><span>大</span></li>";
			} else if (arr[i] == "小") {
                fristCode = '小';
				daxiaoHtml[0] += "<li class='circle-xiao'><span>小</span></li>";
			} else {
				daxiaoHtml[0] += "<li class='circle-he'><span>和</span></li>";
			}
		}
        // if (arr[i+1]==arr[i] || arr[i+1]=="和"||(arr[i]=="和"&&arr[i-1]==arr[i+1])) { //如果下一个值跟上一个值一样就排到下一行
        /**
         * 2017-06-20
         * 在当前竖下：当前行==上一行 或 当前行==和 则 继续在当前竖继续追写
         * 当出现 上一行为和，当前“行”为和，而下一“行” 等于 此竖的第一"行"的开奖种类时，则不进入。
         * 判斷應為：当前球=和 或者 当前球 == 當前列第一球
         */
        if(arr[i+1]=="和"||arr[i+1] == fristCode ){
			cols++;
			if (arr[i+1] == "大") {
				daxiaoHtml[cols] += "<li class='circle-da'><span>大</span></li>";
			} else if (arr[i+1] == "小") {
				daxiaoHtml[cols] += "<li class='circle-xiao'><span>小</span></li>";
			} else {
				daxiaoHtml[cols] += "<li class='circle-he'><span>和</span></li>";
			}
			//如果排到第六行，前后值还一样就继续排到第六行；
			if (cols > 5) {
				if (arr[i + 1] == "大") {
					daxiaoHtml[5] += "<li class='circle-da'><span>大</span></li>";
				} else if (arr[i + 1] == "小") {
					daxiaoHtml[5] += "<li class='circle-xiao'><span>小</span></li>";
				} else {
					daxiaoHtml[5] += "<li class='circle-he'><span>和</span></li>";
				}
				row++;
			}
		} else {
			//判断一列是否全满，如果没有全满则添加空白
			if (cols < 5) {
				for (var m = 5; m > cols; m--) {
					daxiaoHtml[m] += "<li></li>";
				}

			} else if (cols > 5) {
				for (var n = 0; n < 5; n++) {
					for (var k = 0; k < row; k++) {
						daxiaoHtml[n] += "<li></li>";
					}
				}
			}
			if (arr[i + 1] == "大") {
                fristCode = '大';
				daxiaoHtml[0] += "<li class='circle-da'><span>大</span></li>";
			} else if (arr[i + 1] == "小") {
                fristCode = '小';
				daxiaoHtml[0] += "<li class='circle-xiao'><span>小</span></li>";
			}
			cols = 0;
			row = 0;
		}
	}
	daxiaoHtml[0] += '</ul>';
	daxiaoHtml[1] += '</ul>';
	daxiaoHtml[2] += '</ul>';
	daxiaoHtml[3] += '</ul>';
	daxiaoHtml[4] += '</ul>';
	daxiaoHtml[5] += '</ul>';
	daxiaoPanel.append(daxiaoHtml[0]+daxiaoHtml[1]+daxiaoHtml[2]+daxiaoHtml[3]+daxiaoHtml[4]+daxiaoHtml[5]);
}

function pattendanshuang(arr,shortName) {
	var cols = 0,
		row = 0; //cols表示列 row表示行
	var danshuangPanel = $("#danshuang_"+shortName);
	danshuangPanel.empty();
	var danshuangHtml = [];
	danshuangHtml[0] = '<ul class="row1">';
	danshuangHtml[1] = '<ul class="row2">';
	danshuangHtml[2] = '<ul class="row3">';
	danshuangHtml[3] = '<ul class="row4">';
	danshuangHtml[4] = '<ul class="row5">';
	danshuangHtml[5] = '<ul class="row6">';
	for (var i = 0; i < arr.length; i++) {
		if (i == 0) {
			if (arr[i] == "单") {
				danshuangHtml[0] += "<li class='circle-dan'><span>单</span></li>";
			} else if (arr[i] == "双") {
				danshuangHtml[0] += "<li class='circle-shuang'><span>双</span></li>";
			}
		}
		if (arr[i + 1] == arr[i]) { //如果下一个值跟上一个值一样就排到下一行
			cols++;
			//console.debug(arr[i+1]);
			if (arr[i + 1] == "单") {
				danshuangHtml[cols] += "<li class='circle-dan'><span>单</span></li>";
			} else if (arr[i + 1] == "双") {
				danshuangHtml[cols] += "<li class='circle-shuang'><span>双</span></li>";
			}
			//如果排到第六行，前后值还一样就继续排到第六行；
			if (cols > 5) {
				//cols=4;
				if (arr[i + 1] == "单") {
					danshuangHtml[5] += "<li class='circle-dan'><span>单</span></li>";
				} else if (arr[i + 1] == "双") {
					danshuangHtml[5] += "<li class='circle-shuang'><span>双</span></li>";
				}
				row++;
			}
		} else {
			//判断一列是否全满，如果没有全满则添加空白
			if (cols < 5) {
				for (var m = 5; m > cols; m--) {
					danshuangHtml[m] += "<li></li>";
				}

			} else if (cols > 5) {
				for (var n = 0; n < 5; n++) {
					for (var k = 0; k < row; k++) {
						danshuangHtml[n] += "<li></li>";
					}
				}
			}
			if (arr[i + 1] == "单") {
				danshuangHtml[0] += "<li class='circle-dan'><span>单</span></li>";
			} else if (arr[i + 1] == "双") {
				danshuangHtml[0] += "<li class='circle-shuang'><span>双</span></li>";
			}
			cols = 0;
			row = 0;
		}
	}
	danshuangHtml[0] += '</ul>';
	danshuangHtml[1] += '</ul>';
	danshuangHtml[2] += '</ul>';
	danshuangHtml[3] += '</ul>';
	danshuangHtml[4] += '</ul>';
	danshuangHtml[5] += '</ul>';
	danshuangPanel.append(danshuangHtml[0]+danshuangHtml[1]+danshuangHtml[2]+danshuangHtml[3]+danshuangHtml[4]+danshuangHtml[5]);
}

function pattenjiou(arr,shortName) {
	var cols = 0,
		row = 0,
        fristCode; //cols表示列 row表示行 fristCode标识当前列第一个球
	var jiouPanel = $("#jiou_"+shortName);
	jiouPanel.empty();
	var jiouHtml = [];
	jiouHtml[0] = '<ul class="row1">';
	jiouHtml[1] = '<ul class="row2">';
	jiouHtml[2] = '<ul class="row3">';
	jiouHtml[3] = '<ul class="row4">';
	jiouHtml[4] = '<ul class="row5">';
	jiouHtml[5] = '<ul class="row6">';
	for (var i = 0; i < arr.length; i++) {
		if (i == 0) {
			if (arr[i] == "奇") {
                fristCode = '奇';
				jiouHtml[0] += "<li class='circle-qi'><span>奇</span></li>";
			} else if (arr[i] == "偶") {
                fristCode = '偶';
				jiouHtml[0] += "<li class='circle-ou'><span>偶</span></li>";
			} else {
				jiouHtml[0] += "<li class='circle-he'><span>和</span></li>";
			}
		}
        // if (arr[i + 1] == arr[i] || arr[i + 1] == "和"||(arr[i]=="和"&&arr[i-1]==arr[i+1])) { //如果下一个值跟上一个值一样就排到下一行
        /**
         * 2017-06-20
         * 在当前竖下：当前行==上一行 或 当前行==和 则 继续在当前竖继续追写
         * 当出现 上一行为和，当前“行”为和，而下一“行” 等于 此竖的第一"行"的开奖种类时，则不进入。
         * 判斷應為：当前球=和 或者 当前球 == 當前列第一球
         */
        if(arr[i+1]=="和"||arr[i+1] == fristCode ){
			cols++;
			//console.debug(arr[i+1]);
			if (arr[i + 1] == "奇") {
				jiouHtml[cols] += "<li class='circle-qi'><span>奇</span></li>";
			} else if (arr[i + 1] == "偶") {
				jiouHtml[cols] += "<li class='circle-ou'><span>偶</span></li>";
			} else {
				jiouHtml[cols] += "<li class='circle-he'><span>和</span></li>";
			}
			//如果排到第六行，前后值还一样就继续排到第六行；
			if (cols > 5) {
				//cols=4;
				if (arr[i + 1] == "奇") {
					jiouHtml[5] += "<li class='circle-qi'><span>奇</span></li>";
				} else if (arr[i + 1] == "偶") {
					jiouHtml[5] += "<li class='circle-ou'><span>偶</span></li>";
				} else {
					jiouHtml[5] += "<li class='circle-he'><span>和</span></li>";
				}
				row++;
			}
		} else {
			//判断一列是否全满，如果没有全满则添加空白
			if (cols < 5) {
				for (var m = 5; m > cols; m--) {
					jiouHtml[m] += "<li></li>";
				}

			} else if (cols > 5) {
				for (var n = 0; n < 5; n++) {
					for (var k = 0; k < row; k++) {
						jiouHtml[n] += "<li></li>";
					}
				}
			}
			if (arr[i + 1] == "奇") {
                fristCode = '奇';
				jiouHtml[0] += "<li class='circle-qi'><span>奇</span></li>";
			} else if (arr[i + 1] == "偶") {
                fristCode = '偶';
				jiouHtml[0] += "<li class='circle-ou'><span>偶</span></li>";
			}
			cols = 0;
			row = 0;
		}
	}
	jiouHtml[0] += '</ul>';
	jiouHtml[1] += '</ul>';
	jiouHtml[2] += '</ul>';
	jiouHtml[3] += '</ul>';
	jiouHtml[4] += '</ul>';
	jiouHtml[5] += '</ul>';
	jiouPanel.append(jiouHtml[0]+jiouHtml[1]+jiouHtml[2]+jiouHtml[3]+jiouHtml[4]+jiouHtml[5]);
}

function pattenshangxia(arr,shortName) {
	var cols = 0,
		row = 0,
        fristCode; //cols表示列 row表示行 fristCode标识当前列第一个球
	var shangxiaPanel = $("#shangxia_"+shortName);
	shangxiaPanel.empty();
	var shangxiaHtml = [];
	shangxiaHtml[0] = '<ul class="row1">';
	shangxiaHtml[1] = '<ul class="row2">';
	shangxiaHtml[2] = '<ul class="row3">';
	shangxiaHtml[3] = '<ul class="row4">';
	shangxiaHtml[4] = '<ul class="row5">';
	shangxiaHtml[5] = '<ul class="row6">';
	for (var i = 0; i < arr.length; i++) {
		if (i == 0) {
			if (arr[i] == "上") {
                fristCode = '上';
				shangxiaHtml[0] += "<li class='circle-shang'><span>上</span></li>";
			} else if (arr[i] == "下") {
                fristCode = '下';
				shangxiaHtml[0] += "<li class='circle-xia'><span>下</span></li>";
			} else {
				shangxiaHtml[0] += "<li class='circle-zhong'><span>中</span></li>";
			}
		}
        // if (arr[i + 1] == arr[i] || arr[i + 1] == "中") { //如果下一个值跟上一个值一样就排到下一行
        /**
         * 2017-06-20
         * 在当前竖下：当前行==上一行 或 当前行==中 则 继续在当前竖继续追写
         * 当出现 上一行为中，当前“行”为中，而下一“行” 等于 此竖的第一"行"的开奖种类时，则不进入。
         * 判斷應為：当前球=中 或者 当前球 == 當前列第一球
         */
        if(arr[i+1]=="中"||arr[i+1] == fristCode ){
			cols++;
			//console.debug(arr[i+1]);
			if (arr[i + 1] == "上") {
				shangxiaHtml[cols] += "<li class='circle-shang'><span>上</span></li>";
			} else if (arr[i + 1] == "下") {
				shangxiaHtml[cols] += "<li class='circle-xia'><span>下</span></li>";
			} else {
				shangxiaHtml[cols] += "<li class='circle-zhong'><span>中</span></li>";
			}
			//如果排到第六行，前后值还一样就继续排到第六行；
			if (cols > 5) {
				//cols=4;
				if (arr[i + 1] == "上") {
					shangxiaHtml[5] += "<li class='circle-shang'><span>上</span></li>";
				} else if (arr[i + 1] == "下") {
					shangxiaHtml[5] += "<li class='circle-xia'><span>下</span></li>";
				} else {
					shangxiaHtml[5] += "<li class='circle-zhong'><span>中</span></li>";
				}
				row++;
			}
		} else {
			//判断一列是否全满，如果没有全满则添加空白
			if (cols < 5) {
				for (var m = 5; m > cols; m--) {
					shangxiaHtml[m] += "<li></li>";
				}

			} else if (cols > 5) {
				for (var n = 0; n < 5; n++) {
					for (var k = 0; k < row; k++) {
						shangxiaHtml[n] += "<li></li>";
					}
				}
			}
			if (arr[i + 1] == "上") {
                fristCode = '上';
				shangxiaHtml[0] += "<li class='circle-shang'><span>上</span></li>";
			} else if (arr[i + 1] == "下") {
                fristCode = '下';
				shangxiaHtml[0] += "<li class='circle-xia'><span>下</span></li>";
			}
			cols = 0;
			row = 0;
		}
	}
	shangxiaHtml[0] += '</ul>';
	shangxiaHtml[1] += '</ul>';
	shangxiaHtml[2] += '</ul>';
	shangxiaHtml[3] += '</ul>';
	shangxiaHtml[4] += '</ul>';
	shangxiaHtml[5] += '</ul>';
	shangxiaPanel.append(shangxiaHtml[0]+shangxiaHtml[1]+shangxiaHtml[2]+shangxiaHtml[3]+shangxiaHtml[4]+shangxiaHtml[5]);
}

function pattenhezhi(arr,shortName) {
	var cols = 0;
	var hezhiPanel = $("#hezhi_"+shortName+" ul");
	for (var i = 0; i < arr.length; i++) {
		cols++;
//		console.debug(arr[i]);
		if (arr[i] > 210 && arr[i] < 810) { //表示小
			hezhiPanel.eq(cols - 1).append("<li class='shuz-x'><span>" + arr[i] + "</span></li>");
		} else if (arr[i] > 810 && arr[i] < 1410) {
			hezhiPanel.eq(cols - 1).append("<li class='shuz-da'><span>" + arr[i] + "</span></li>");
		} else if (arr[i] == 810) {
			hezhiPanel.eq(cols - 1).append("<li class='shuz-he'><span>" + arr[i] + "</span></li>");
		}
		if (cols > 5) {
			cols = 0;
		}

	}
	var arr_cols=[],max_size=0;
	for (var i = 0; i < 6; i++) {
			arr_cols.push(hezhiPanel.eq(i).children().size());
		}
	max_size=Math.max.apply(null,arr_cols);//找出数组中的最大值
	for (var i = 0; i < 6; i++) {
			var tmp=hezhiPanel.eq(i).children('li').size();
			if(tmp<max_size){
				hezhiPanel.eq(i).append("<li></li>");
			}
		}

}

function pattenwuxing(arr,shortName) {
	var cols = 0,
		row = 0; //cols表示列 row表示行
	var wuxingPanel = $("#wuxing_"+shortName);
	wuxingPanel.empty();
	var wuxingHtml = [];
	wuxingHtml[0] = '<ul class="row1">';
	wuxingHtml[1] = '<ul class="row2">';
	wuxingHtml[2] = '<ul class="row3">';
	wuxingHtml[3] = '<ul class="row4">';
	wuxingHtml[4] = '<ul class="row5">';
	wuxingHtml[5] = '<ul class="row6">';
	for (var i = 0; i < arr.length; i++) {
		if (i == 0) {
			if (arr[i] == "金") {
				wuxingHtml[0] += "<li class='circle-jin'><span>金</span></li>";
			} else if (arr[i] == "木") {
				wuxingHtml[0] += "<li class='circle-mu'><span>木</span></li>";
			} else if (arr[i] == "水") {
				wuxingHtml[0] += "<li class='circle-shui'><span>水</span></li>";
			} else if (arr[i] == "火") {
				wuxingHtml[0] += "<li class='circle-huo'><span>火</span></li>";
			} else if (arr[i] == "土") {
				wuxingHtml[0] += "<li class='circle-tu'><span>土</span></li>";
			}
		}
		if (arr[i + 1] == arr[i]) { //如果下一个值跟上一个值一样就排到下一行
			cols++;
			if (arr[i + 1] == "金") {
				wuxingHtml[cols] += "<li class='circle-jin'><span>金</span></li>";
			} else if (arr[i + 1] == "木") {
				wuxingHtml[cols] += "<li class='circle-mu'><span>木</span></li>";
			} else if (arr[i + 1] == "水") {
				wuxingHtml[cols] += "<li class='circle-shui'><span>水</span></li>";
			} else if (arr[i + 1] == "火") {
				wuxingHtml[cols] += "<li class='circle-huo'><span>火</span></li>";
			} else if (arr[i + 1] == "土") {
				wuxingHtml[cols] += "<li class='circle-tu'><span>土</span></li>";
			}
			//如果排到第六行，前后值还一样就继续排到第六行；
			if (cols > 5) {
				//cols=4;
				if (arr[i + 1] == "金") {
					wuxingHtml[5] += "<li class='circle-jin'><span>金</span></li>";
				} else if (arr[i + 1] == "木") {
					wuxingHtml[5] += "<li class='circle-mu'><span>木</span></li>";
				} else if (arr[i + 1] == "水") {
					wuxingHtml[5] += "<li class='circle-shui'><span>水</span></li>";
				} else if (arr[i + 1] == "火") {
					wuxingHtml[5] += "<li class='circle-huo'><span>火</span></li>";
				} else if (arr[i + 1] == "土") {
					wuxingHtml[5] += "<li class='circle-tu'><span>土</span></li>";
				}
				row++;
			}
		} else {
			//判断一列是否全满，如果没有全满则添加空白
			if (cols < 5) {
				for (var m = 5; m > cols; m--) {
					wuxingHtml[m] += "<li></li>";
				}

			} else if (cols > 5) {
				for (var n = 0; n < 5; n++) {
					for (var k = 0; k < row; k++) {
						wuxingHtml[n] += "<li></li>";
					}
				}
			}
			if (arr[i + 1] == "金") {
				wuxingHtml[0] += "<li class='circle-jin'><span>金</span></li>";
			} else if (arr[i + 1] == "木") {
				wuxingHtml[0] += "<li class='circle-mu'><span>木</span></li>";
			} else if (arr[i + 1] == "水") {
				wuxingHtml[0] += "<li class='circle-shui'><span>水</span></li>";
			} else if (arr[i + 1] == "火") {
				wuxingHtml[0] += "<li class='circle-huo'><span>火</span></li>";
			} else if (arr[i + 1] == "土") {
				wuxingHtml[0] += "<li class='circle-tu'><span>土</span></li>";
			}
			cols = 0;
			row = 0;
		}
	}
	wuxingHtml[0] += '</ul>';
	wuxingHtml[1] += '</ul>';
	wuxingHtml[2] += '</ul>';
	wuxingHtml[3] += '</ul>';
	wuxingHtml[4] += '</ul>';
	wuxingHtml[5] += '</ul>';
	wuxingPanel.append(wuxingHtml[0]+wuxingHtml[1]+wuxingHtml[2]+wuxingHtml[3]+wuxingHtml[4]+wuxingHtml[5]);
}
//===========================彩票路单编写结束=========================================//
//大小单双奇偶上下和值五行切换
function tabs(tabTit, on, tabCon,shortName) {
	$(tabTit).children().click(function() {
		arr=[],max_len=0,max_size=0;
		$(this).addClass(on).siblings().removeClass(on);
		var index = $(tabTit).children().index(this);
		var showId= $(this).attr('data-common');
		if(!showId) {
			return;
		}
		//$(tabCon).children().eq(index).show().siblings().hide();
		if(shortName==showId.split("_")[1]){
				$("#"+showId).show();
	           if(showId.split("_")[0]!='daxiao'){
	        	   $("#daxiao_"+showId.split("_")[1]).hide();
	           	   $("#daxiao_"+showId.split("_")[1]).children().css('left', 0);
	           }
			   if(showId.split("_")[0]!='danshuang'){
	        	   $("#danshuang_"+showId.split("_")[1]).hide();
	        	   $("#danshuang_"+showId.split("_")[1]).children().css('left', 0);
	           }
			   if(showId.split("_")[0]!='jiou'){
	        	   $("#jiou_"+showId.split("_")[1]).hide();
	        	   $("#jiou_"+showId.split("_")[1]).children().css('left', 0);
	           }
			   if(showId.split("_")[0]!='shangxia'){
	        	   $("#shangxia_"+showId.split("_")[1]).hide();
	        	   $("#shangxia_"+showId.split("_")[1]).children().css('left', 0);
	           }
			   if(showId.split("_")[0]!='hezhi'){
	        	   $("#hezhi_"+showId.split("_")[1]).hide();
	        	   $("#hezhi_"+showId.split("_")[1]).children().css('left', 0);
	           }
			   if(showId.split("_")[0]!='wuxing'){
	        	   $("#wuxing_"+showId.split("_")[1]).hide();
	        	   $("#wuxing_"+showId.split("_")[1]).children().css('left', 0);
	           }
			for (var i = 0; i < 6; i++) {
				arr.push($("#"+showId).children().eq(i).children().size());
			}
			max_size=Math.max.apply(null,arr);//找出数组中的最大值
			var max_w=0;
			if(showId.split("_")[0]=='hezhi'){
				max_len = -max_size * 23+815;
				max_w = max_size * 23;
			}else{
				max_len = -max_size * 19+815;
				max_w = max_size * 19;
			}
			$("#"+showId).children().animate({left: max_len,width:max_w},1500,function(){
				$(".arrow-r").addClass('hui-r').removeClass('hei-r');
				$(".arrow-l").addClass('hei-l').removeClass('hui-l');
//			$("#lotteryRoute_"+shortName+" div").eq(index).siblings().children().css('left', 0);
				  if(showId.split("_")[0]!='daxiao'){
		           	   $("#daxiao_"+showId.split("_")[1]).children().css('left', 0);
		           }
				   if(showId.split("_")[0]!='danshuang'){
		        	   $("#danshuang_"+showId.split("_")[1]).children().css('left', 0);
		           }
				   if(showId.split("_")[0]!='jiou'){
		        	   $("#jiou_"+showId.split("_")[1]).children().css('left', 0);
		           }
				   if(showId.split("_")[0]!='shangxia'){
		        	   $("#shangxia_"+showId.split("_")[1]).children().css('left', 0);
		           }
				   if(showId.split("_")[0]!='hezhi'){
		        	   $("#hezhi_"+showId.split("_")[1]).children().css('left', 0);
		           }
				   if(showId.split("_")[0]!='wuxing'){
		        	   $("#wuxing_"+showId.split("_")[1]).children().css('left', 0);
		           }
			});
		}
	});
	$('[data-common="daxiao_'+shortName+'"]').click();
}